import { defineStore } from "pinia";

export interface RectangleDialog {
  show: boolean;
  type: string;
  data:any;
}

const useRectangleDialog = defineStore("rectangleDialog", {
  state: (): RectangleDialog => {
    return {
      show: false, //是否显示弹窗
      type: '', //弹窗类型
      data:[], //弹窗数据
    }
  },
  actions: {
    setState(val,type,data) {
      this.show = val;
      this.type = type;
      this.data = data;
    },
  },
});

export default useRectangleDialog;
